package com.sport.service.impl;

import com.sport.bean.PageParam;
import com.sport.bean.Project;
import com.sport.dao.IProjectDao;
import com.sport.service.IProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author wxq
 * @Date 2021/5/9
 **/
@Service
public class ProjectServiceImpl implements IProjectService {

    @Autowired
    private IProjectDao projectDao;


    @Override
    public int addProject(Project project) {
        return projectDao.addProject(project);
    }

    @Override
    public int deleteProject(Integer pId) {
        return projectDao.deleteProject(pId);
    }

    @Override
    public int editProject(Project project) {
        return projectDao.editProject(project);
    }

    @Override
    public List<Project> listPage(PageParam<Project> pageParam) {
        List<Project> projectList = projectDao.listPage(pageParam);
        return projectList;
    }

    @Override
    public Project findById(Integer id) {
        return projectDao.findById(id);
    }

    @Override
    public int updateState(Integer id, Integer state) {
        return projectDao.updateState(id, state);
    }


}
